package com.iv.durian.cloud.dao;

import com.iv.durian.cloud.Banner;
import com.iv.durian.cloud.dao.mapper.BannerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class BannerDao {
    @Autowired
    private BannerMapper bannerMapper;

    public int add(Banner banner) {
        return bannerMapper.add(banner);
    }

    public int update(Banner banner) {
        return bannerMapper.update(banner);
    }

    public int remove(Integer id) {
        return bannerMapper.remove(id);
    }

    public int count(Integer type, Integer status) {
        return bannerMapper.count(type, status);
    }

    public List<Banner> list(Integer type, Integer status) {
        return bannerMapper.list(type,status);
    }

    public Banner get(Integer id) {
        return bannerMapper.get(id);
    }
}
